<script lang="ts" setup>
import { BookOutlined, FileOutlined } from '@ant-design/icons-vue';
import type { ItemType } from 'ant-design-vue';
import { VueElement, h, reactive } from 'vue';


function getItem(
  label: VueElement | string,
  key: string,
  icon?: any,
  children?: ItemType[],
  type?: 'group',
): ItemType {
  return {
    key,
    icon,
    children,
    label,
    type,
  } as ItemType;
}

const items: ItemType[] = reactive([
  getItem('课程课件', 'courseware', () => h(BookOutlined)),
  getItem('课程资料', 'resource', () => h(FileOutlined)),
]);


</script>


<template>
  <a-menu mode="inline" :items="items" />
</template>
